package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.HomePurchasePlan;
import com.realtyManage.springboot.Model.Do.HouseFans;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 置业计划书
 * @author 杭州素色网络科技有限公司
 * @since 2019-11-05
 */

@Repository
public interface HomePurchasePlanRepository extends JpaRepository<HomePurchasePlan, Integer>, JpaSpecificationExecutor<HomePurchasePlan> {


    @Query(value="SELECT * FROM home_purchase_plan where user_id = ?1 ORDER BY time DESC",nativeQuery=true)
    List<HomePurchasePlan> getHomePurchasePlan(String id);
}
